<template>
  <div class="demo-collapse" style="width: 900px">
    <el-collapse
      v-model="activeName"
      accordion
      style="margin-top: 50px; margin-left: 90px"
    >
      <el-collapse-item v-for="(l, index) in certificateStudyData.list" :key="index">
        <template #title>
          <p v-text="l.projectname"></p>
        </template>
        <div>
          <p v-text="l.descript"></p>
        </div>
        <div>
          <p ></p>
          时间：2033-9-2</div>
      </el-collapse-item>
    </el-collapse>
  </div>
</template>

<script lang="ts" setup>
import { descriptionProps } from "element-plus";
import { ref } from "vue";
import API from "../pluging/axiosInstance.js";
import { useRoute } from 'vue-router'
import { reactive } from "vue";


const route = useRoute()
const name = route.query.name
const id = route.query.id
console.log("certificatestudy id:"+id)
function getData () {
   API({
    url: "/home/certificate/study",
    method: "post",
    data: {
       id:id
    },
  }).then((res) => {
    console.log(res.data)
    certificateStudyData.list=res.data.dataList
    console.log("请求成功!" + "请求数据：");
    console.log('项目名称：'+certificateStudyData.list[currentId].projectname );

    // console.log(loginData.id)
  });
};

getData()

const certificateStudyData = reactive({
  list:[{
    projectid:'',
    projectname:'',
    level: "",
    degree:'',
    descript: "",
    date:''
  }]
});

const  currentId=0;






const activeName = ref("1");


</script>
